﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 默写
{
    public partial class NewBookFrm : Form
    {
        public NewBookFrm()
        {
            InitializeComponent();
            this.CancelButton = button2;
            this.AcceptButton = button1;
        }

        public int Grade {
            get {
                return (int)numericUpDown1.Value;
            }
        }

        public ABookLevel level {
            get {
                return (ABookLevel)Enum.Parse(typeof(ABookLevel), comboBox1.Text, true);
            }
        }

        private void NewBookFrm_Activated(object sender, EventArgs e)
        {
            comboBox1.SelectedIndex = 0;
        }
    }
}
